import request from '@/utils/request'

export default {
  /**
   * 获取所有订单类型
   * @returns {AxiosPromise}
   */
  getOrderTypeAll() {
    return request({
      url: 'base/goods/pd-goods-type/all',
      method: 'get'
    })
  },
  /**
   * 添加货物类型
   * @param data
   * @returns {AxiosPromise}
   */
  addTruckType(data) {
    return request({
      url: `base/goods/pd-truck-type`,
      method: 'post',
      data: data
    })
  },
  /**
   * 分页查询数据
   * @param pageNum
   * @param pageSize
   * @returns {AxiosPromise}
   */
  truckTypePage(pageNum, pageSize) {
    return request({
      url: 'base/goods/pd-truck-type/page',
      method: 'get',
      params: {
        'page': pageNum,
        'pageSize': pageSize
      }
    })
  }
}
